package com.iris.live.services.data.models;

import javax.persistence.*;

/**
 * Created by SallyGo on 2016/12/10.
 */
@Entity
@Table(name = "update_info", schema = "live", catalog = "")
public class UpdateInfoModel {
    private Integer id;
    private String dlcode;
    private String phase;
    private String ver;
    private String forceState;
    private String platformState;
    private String platform;
    private String nameDetail;
    private String url;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "dlcode")
    public String getDlcode() {
        return dlcode;
    }

    public void setDlcode(String dlcode) {
        this.dlcode = dlcode;
    }

    @Basic
    @Column(name = "phase")
    public String getPhase() {
        return phase;
    }

    public void setPhase(String phase) {
        this.phase = phase;
    }

    @Basic
    @Column(name = "ver")
    public String getVer() {
        return ver;
    }

    public void setVer(String ver) {
        this.ver = ver;
    }

    @Basic
    @Column(name = "forceState")
    public String getForceState() {
        return forceState;
    }

    public void setForceState(String forceState) {
        this.forceState = forceState;
    }

    @Basic
    @Column(name = "platformState")
    public String getPlatformState() {
        return platformState;
    }

    public void setPlatformState(String platformState) {
        this.platformState = platformState;
    }

    @Basic
    @Column(name = "platform")
    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    @Basic
    @Column(name = "nameDetail")
    public String getNameDetail() {
        return nameDetail;
    }

    public void setNameDetail(String nameDetail) {
        this.nameDetail = nameDetail;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UpdateInfoModel that = (UpdateInfoModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (dlcode != null ? !dlcode.equals(that.dlcode) : that.dlcode != null) return false;
        if (phase != null ? !phase.equals(that.phase) : that.phase != null) return false;
        if (ver != null ? !ver.equals(that.ver) : that.ver != null) return false;
        if (forceState != null ? !forceState.equals(that.forceState) : that.forceState != null) return false;
        if (platformState != null ? !platformState.equals(that.platformState) : that.platformState != null)
            return false;
        if (platform != null ? !platform.equals(that.platform) : that.platform != null) return false;
        if (nameDetail != null ? !nameDetail.equals(that.nameDetail) : that.nameDetail != null) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (dlcode != null ? dlcode.hashCode() : 0);
        result = 31 * result + (phase != null ? phase.hashCode() : 0);
        result = 31 * result + (ver != null ? ver.hashCode() : 0);
        result = 31 * result + (forceState != null ? forceState.hashCode() : 0);
        result = 31 * result + (platformState != null ? platformState.hashCode() : 0);
        result = 31 * result + (platform != null ? platform.hashCode() : 0);
        result = 31 * result + (nameDetail != null ? nameDetail.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        return result;
    }
}
